<template>
  <div>
    <el-row class="well-box">
      <el-col>
        <div class="well">
          <el-row>
            <el-col :span="2">
              <h3 class="month">本月爆款</h3>
            </el-col>
            <el-col :span="5" class="tow">
              <ul class="well-ul">
                <li>臻选热销表
                  <i class="el-icon-caret-bottom"></i>
                </li>
              </ul>
            </el-col>
          </el-row>
          <el-row>
            <el-col>
              <div class="well-product">
                <el-row>
                  <el-col :span="8">
                    <a href="javascript:" class="product1">
                      <img src="//image8.wbiao.co/mall/38a9de37fd3846c0a47021665c025964.jpg" />
                    </a>
                  </el-col>
                  <el-col :span="16">
                    <ul>
                      <li class="all-product" v-for="(item,index) in all" :key="index">
                        <a href="javascript:" class="all">
                          <img :src="item.url" />
                        </a>
                      </li>
                    </ul>
                  </el-col>
                </el-row>

              </div>
            </el-col>
          </el-row>
          <el-row>
            <el-col>
              <div class="hand">
                <el-row>
                  <el-col :span="2">
                    <h3 class="hand-title">二手拍卖</h3>
                  </el-col>
                  <el-col :span="2" :push="20">
                    <a href="javascript:" class="hand-all">查看更多<i class="el-icon-arrow-right"></i></a>
                  </el-col>
                </el-row>
                <el-row>
                  <el-col :span="8">
                    <a href="javascript:" class="hand-img">
                      <img src="//image8.wbiao.co/mall/3d6c14176c1c4cb298324b0f630298bb.jpg" />
                    </a>
                  </el-col>
                  <el-col :span="16">
                    <template>
                      <el-carousel :interval="5000" arrow="always">
                        <el-carousel-item v-for="(item,index) in hand" :key="index">
                          <ul class="hand-all1">
                            <li>
                              <div class="allimg">
                                <a href="javascript:" class="allimg-img">
                                  <img :src="item.url" />
                                </a>
                              </div>
                              <p class="text">{{item.title}}</p>
                              <div class="time"><i class="time-img">🔨</i>{{tim[index].hour}}:{{tim[index].min}}:{{tim[index].second}}</div>
                              <p class="price"><span>¥{{item.price}}</span><del>¥{{item.del}}</del></p>
                            </li>
                            <li>
                              <div class="allimg">
                                <a href="javascript:" class="allimg-img">
                                  <img :src="item.url1" />
                                </a>
                              </div>
                              <p class="text">{{item.title1}}</p>
                              <div class="time"><i class="time-img">🔨</i>{{tim[index].hour1}}:{{tim[index].min}}:{{tim[index].second}}</div>
                              <p class="price"><span>¥{{item.price1}}</span><del>¥{{item.del1}}</del></p>
                            </li>
                            <li>
                              <div class="allimg">
                                <a href="javascript:" class="allimg-img">
                                  <img :src="item.url2" />
                                </a>
                              </div>
                              <p class="text">{{item.title3}}</p>
                              <div class="time"><i class="time-img">🔨</i>{{tim[index].hour2}}:{{tim[index].min}}:{{tim[index].second}}</div>
                              <p class="price"><span>¥{{item.price3}}</span><del>¥{{item.del3}}</del></p>
                            </li>
                            <li>
                              <div class="allimg">
                                <a href="javascript:" class="allimg-img">
                                  <img :src="item.url3" />
                                </a>
                              </div>
                              <p class="text">{{item.title3}}</p>
                              <div class="time"><i class="time-img">🔨</i>{{tim[index].hour3}}:{{tim[index].min}}:{{tim[index].second}}</div>
                              <p class="price"><span>¥{{item.price3}}</span><del>¥{{item.del3}}</del></p>
                            </li>

                          </ul>
                        </el-carousel-item>
                      </el-carousel>
                    </template>
                  </el-col>
                </el-row>
              </div>
            </el-col>
          </el-row>
        </div>
      </el-col>

    </el-row>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        tim: [{
          hour: 0,
          min: 0,
          second: 0,
          hour1: 0,
          hour2: 0,
          hour3: 0,
        },
          {
            hour: 0,
            min: 0,
            second: 0,
            hour1: 0,
            hour2: 0,
            hour3: 0,
          }
        ],
        all: [{
            url: "//image8.wbiao.co/mall/0b1bee47ee8d4ca697f75930ba7c1048.jpg"
          },
          {
            url: "//image8.wbiao.co/mall/86ff273539824fc0962a18cbdcb1dc44.jpg"
          },
          {
            url: "//image8.wbiao.co/mall/f8fe3b65de894310b096d7432d69251b.jpg"
          },
          {
            url: "//image8.wbiao.co/mall/f688d39fbb4f499eb4847cf6498a677c.jpg"
          }
        ],
        hand: [{
            url: require("@/assets/img1.jpg"),
            title: "雅典",
            price: "24000",
            del: "56.000",
            url1: require("@/assets/img4.jpg"),
            title1: "浪琴",
            price1: "15500",
            del1: "22,500",
            url2: require('@/assets/img2.jpg'),
            title2: "欧米茄",
            price2: "54900",
            del2: "127,700",
            url3: require("@/assets/img3.jpg"),
            title3: "卡地亚",
            price3: "24000",
            del3: "47,600"
          },
          {
            url: require("@/assets/img5.jpg"),
            title: "雅典",
            price: "24000",
            del: "56.000",
            url1: require("@/assets/img6.jpg"),
            title1: "浪琴",
            price1: "15500",
            del1: "22,500",
            url2: require("@/assets/img7.jpg"),
            title2: "欧米茄",
            price2: "54900",
            del2: "127,700",
            url3: require("@/assets/8.jpg"),
            title3: "卡地亚",
            price3: "24000",
            del3: "47,600"
          }
        ]
      }
    },
    components: {

    },
    methods: {
      time() {
        let min = 60
        let second = 60
        let hour = Math.floor(Math.random() * 300)
        let hour1 = Math.floor(Math.random() * 300)
        let hour2 = Math.floor(Math.random() * 300)
        let hour3 = Math.floor(Math.random() * 300)
        let hour4 = Math.floor(Math.random() * 300)
        let hour5 = Math.floor(Math.random() * 300)
        let hour6 = Math.floor(Math.random() * 300)
        let hour7 = Math.floor(Math.random() * 300)
        setInterval(() => {
          min = min
          second = second
          second--
          if (second == 0) {
            second = 60
            min--
            if (min == 0) {
              min = 60
              hour--
              hour1--
              hour2--
              hour3--
              hour4--
              hour5--
              hour6--
              hour7--
            }
          }
          this.$set(this.tim, 0, {
            hour: hour,
            min: min,
            second: second,
            hour1: hour1,
            hour2: hour2,
            hour3: hour3
          })
          this.$set(this.tim, 1, {
            hour: hour4,
            min: min,
            second: second,
            hour1: hour5,
            hour2: hour6,
            hour3: hour7
          })
        }, 1000)
      }
    },
    mounted() {
      this.time()
    }
  }
</script>

<style scoped="scoped">
  .well-box {
    background-color: #F5F5F5;
  }

  .well {
    /* border: 1px solid red; */
    width: 1200px;
    margin: 0 auto;
  }

  .well .month {
    /* border: 1px solid blue; */
    color: #4a4a4a;
    font-size: 20px;
    padding-left: 15px;
    padding-top: 20px;
  }

  .well .well-ul li {
    display: inline-block;
    margin-top: 20px;
    background-color: #333;
    color: #f2d291;
    /* width: 120px; */
    font-size: 12px;
    height: 28px;
    line-height: 28px;
    margin-left: 10px;
  }

  .well .well-ul li i {
    display: block;
    margin-left: 20px;
    color: #333;
    position: ab;
  }

  .well .well-product .product1 {
    display: block;
    overflow: hidden;
  }

  .well .well-product .product1 img {
    transition: transform 1s;
  }

  .well .well-product .product1 img:hover {
    transform: scale(1.1);
  }

  .well .well-product ul .all-product {
    /* border: 1px solid red; */
    width: 388px;
    height: 174px;
    margin: 0;
    float: left;
    margin-right: 10px;
    margin-bottom: 8px;
  }

  .well .well-product ul .all-product a {
    display: block;
  }

  .well .well-product ul .all-product a img {
    max-width: 100%;
    height: 100%;
  }

  .well .well-product ul .all-product a img:hover {
    box-shadow: 0px 0px 8px 5px #eee;
  }

  /* .well .hand {
    border: 1px solid blue;
  } */

  .well .hand .hand-title {
    font-size: 20px;
    color: #cc5252;
    padding-left: 15px;
    padding-top: 20px;
  }

  .well .hand .hand-all {
    font-size: 12px;
    color: #666;
    line-height: 48px;
    height: 48px;
    display: block;
    margin-left: 30px;
    padding-top: 10px;

  }

  .well .hand .hand-all:hover {
    text-decoration: underline;
  }

  .well .hand .hand-img {
    display: block;
    overflow: hidden;
  }

  .well .hand .hand-img img {
    transition: transform 1s;
  }

  .well .hand .hand-img img:hover {
    transform: scale(1.1);
  }

  .well .hand .hand-all1:after {
    content: "";
    display: table;
    clear: both;
  }

  .well .hand .hand-all1 li {
    /* border: 1px solid blue; */
    width: 196px;
    height: 280px;
    float: left;
    /* margin-right: 10px; */
    background-color: #FFFFFF;
  }

  .well .hand .hand-all1 li .allimg {
    width: 125px;
    height: 166px;
    /* border: 1px solid red; */
    margin: 0 auto;
  }

  .well .hand .hand-all1 li .allimg .allimg-img {
    display: block;
    height: 166px;
  }

  .well .hand .hand-all1 li .allimg .allimg-img img {
    width: 100%;
    height: 100%;
  }

  .well .hand .hand-all1 li .text {
    text-align: center;
    font-size: 12px;
    margin-top: 5px;
  }

  .well .hand .hand-all1 li .time {
    width: 80px;
    height: 20px;
    margin: 0 auto;
    font-size: 12px;
    text-align: center;
    line-height: 20px;
    background-color: #d54646;
    border-radius: 15px;
    color: #FFFFFF;
    margin-top: 9px;
  }

  .well .hand .hand-all1 li .price {
    text-align: center;
    font-size: 12px;
    margin-top: 4px;
  }

  .well .hand .hand-all1 li .price span {
    color: #b34747;
  }

  .well .hand .hand-all1 li .price del {
    color: #bababa;
  }

</style>
